<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: BM
  Date: 2024/7/27
  Time: 13:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <style>
        .content{
            margin: 40px auto;
        }
        .upload-cont{
            width: 40%;
        }
    </style>
</head>
<body>
<div class="content">
    <div class="upload-cont">
        <form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/file/upload">
            <div class="input-group">
                <input type="file" name="file" class="form-control" id="inputGroupFile04" aria-describedby="inputGroupFileAddon04" aria-label="文件上传">
                <button class="btn btn-outline-secondary" type="submit" id="inputGroupFileAddon04">提交</button>
            </div>
        </form>

        <div style="margin-top: 30px">
            <h4>文件列表</h4>
            <c:forEach var="item" items="${fileList}">
                <a href="${item.url}">${item.name}</a>
            </c:forEach>
            <a href="${pageContext.request.contextPath}/upload/upload1/qq.png">下载</a>
        </div>
    </div>
</div>
</body>
</html>
